<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Quản lý đơn vị tính</title>
</head>
<body>
	<h1 style="color: blue;">QUẢN LÝ ĐƠN VỊ TÍNH</h1>
<div align="center">
     <table class="table1" id="measureunittable">
						<tr>
							<th scope="col" abbr="Starter">Mã đơn vị tính</th>
							<th scope="col" abbr="Starter">Tên đơn vị tính</th>										
							<th scope="col" abbr="Starter"></th>
							<th scope="col" abbr="Starter"></th>
						</tr>
				
							<c:forEach items="${listAllMeasure.measureDTOs}" var="measure"
								varStatus="status">
								<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">
									<td>${measure.id}</td>
									<td>${measure.unitName}</td>
									<td><a
										href="#" onclick="updateUnit(${measure.id})"><img src="<c:url value="/resources/images/edit-icon.png"/>" /></a
											></td>
											<td><a
										href="#" onclick="deleteUnit(${measure.id})"> <img src="<c:url value="/resources/images/delete-icon1.png"/>" />
											</a
											></td>
								</tr>
							</c:forEach>
					</table>
					<div id="unitpaging"></div>
			<script type="text/javascript">
       			var pager = new Pager('measureunittable', 7);
       			pager.init();
      			pager.showPageNav('pager', 'unitpaging');
       			pager.showPage(1);
			</script>
			<a href="#"><input class="button"
									id="addmeasureunit" type="button" value="Thêm"></a>
			</div>
</body>
</html>